package com.itheima.apidemo;

import java.math.BigDecimal;
import java.util.ArrayList;

/*
Bigdecimal
 */
public class Demo08 {

    public static void main(String[] args) {
        BigDecimal bd1 = new BigDecimal("10.7");
        BigDecimal bd2 = new BigDecimal("13.8");
        System.out.println(bd1);
        System.out.println(bd2);
        System.out.println(bd1.subtract(bd2));
       // System.out.println(bd1.divide(bd2));
        System.out.println(10.7/13.8);
        System.out.println(bd1.divide(bd2, 4, BigDecimal.ROUND_UP));
        System.out.println(bd1.divide(bd2, 4, BigDecimal.ROUND_FLOOR));
        System.out.println(bd1.divide(bd2, 3, BigDecimal.ROUND_HALF_UP));
        //ArrayList<int> ints = new ArrayList<int>();
    }
}
